<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.util.*,com.pub.database.*" %>
<%
  com.pub.database.QueryBean qbnDAO=null;
  StringBuffer lstbSQL=new StringBuffer();
  ArrayList<ArrayList<Object>> aryRowData=null;
  ArrayList<Object> aryData=null;
  String lstrPartNo = null;
  try{

    qbnDAO=new com.pub.database.QueryBean(request.getParameter("DB_ALIAS"),true,"big5","big5");
    lstrPartNo=request.getParameter("part_no").toString().replaceAll("plus","+");
    lstbSQL.append("select item_2nd");
    lstbSQL.append(" from wkf_item_master");
    lstbSQL.append(" where item_2nd=UPPER('");
    lstbSQL.append(lstrPartNo);
    lstbSQL.append("')");

    aryRowData=qbnDAO.querySQL(lstbSQL.toString());

    if(aryRowData!=null){
      aryData=(ArrayList<Object>)aryRowData.get(0);
      out.println(aryData.toString().substring(1,aryData.toString().length()-1));
    }
    else{
      out.println("null");
    }
  }
  catch(Exception e){
    e.printStackTrace();
  }
  finally{
    if(qbnDAO!=null){
      try{qbnDAO.close();}catch(Exception se){se.printStackTrace();}
    }
    if(aryData!=null){
      aryData.clear();
      aryData=null;
    }
    if(aryRowData!=null){
    	aryRowData.clear();
    	aryRowData=null;
    }
    lstbSQL=null;
  }
%>
